All Questions
Tagged with phpzend-framework
35 questions
0votes
1answer
48views
Some Questions on PHP execution?
I am new to PHP . I have primarily worked on java. I want to run the helloworld program for PHP. I got it how to do it through blog But I have got some basic questions :- Do I need to install both ...
0votes
2answers
79views
Is an approach to store classes that belong to a single feature in a single folder, superior to classifying them in several "community" folders?
in my project I am finding that I mix and match the following two patterns, when it comes to organizing classes in folders/namespaces: Modularized MVC Blocks module/Album/Feature/Controller/...
2votes
1answer
204views
Per-Module Unit Testing in ZF2
This question is about handling namespaces and unit testing in ZF2. Let's say I have a module called Application. I have constructed composer.json to be like so "autoload":{ "psr-4": { "...
1vote
3answers
175views
Should I keep "redirect only" methods in my Controller?
Controller: function indexAction() { if ($condition) $this->renumPosition($id); //LINE #1 } //Redirect only - function's sole purpose is to call another function function ...
7votes
2answers
1kviews
Am I using Zend Form library correctly? (I am effectively duplicating work in Controller and in View)
Brief Summary This question is asking for guidance on how to deal with Zend Form library that allows me to specify how to construct each form element (Controller side) and how to render each element (...
1vote
1answer
124views
How far do I, or can I take TDD tests with Service Objects?
In writing PHPSPEC tests for a Zend Framework 2 application, I'm left wondering how far to 'dig'. Consider this very simple case: A DomainService (Domain in the URL sense of the word) should be ...
5votes
2answers
1kviews
Explain ServiceLocator pattern of ZF2
I am looking at this example Relevant excerpt from above: class AlbumController { public function getAlbumTable() { if (!$this->albumTable) { $sm = $this->...
1vote
0answers
149views
Are facilities that generate HTML for you, considered harmful? [closed]
I will approach this from two directions (+ raw HTML itself being de-facto third) Proprietary HTML-generating code Code generating facilities provided by a popular library Proprietary HTML-generating ...
2votes
0answers
223views
Why do some top projects require write permission on code itself? [closed]
Well this could be a very wide question as every project have different philosophies. But meanwhile question is that We have lot of projects like Yii, Drupal, Apigility which requires full write ...
0votes
1answer
749views
Implementing SEO for a Zend Framework/PHP/Angular.js application
A team has implemented a web application using MySql, PHP with the Zend framework and Angular.js on the client side. I am in charge of implementing the SEO for this application. I understand I have ...
1vote
1answer
694views
How bad is it that my index.php in a Zend Framework MVC application mixes definitions and side effects?
I'm introducing some more coding quality standards and checks via a new project - in particular, the PHP-FIG recommendations. This project using Zend Framework 2, and I have a fairly simple entry ...
1vote
1answer
1kviews
Is this a good service locator, and is this service locator pattern(?) OK?
I'm working in Zend framework 1 and was using Zend_Registry to store objects so that I could replace them in my controllers while unit testing: $auth = Zend_Registry::get('Auth'); // set in Bootstrap....
6votes
2answers
2kviews
Strategy to use two different measurement systems in software
I have an application that needs to accept and output values in both US Custom Units and Metric system. Right now the conversion and input and output is a mess. You can only enter in US system, but ...
0votes
1answer
4kviews
Zend framework 2 authentication - only storing the user ID in session
I've just put together my first app using Zend_Authenticate. According to some tutorials I've read they store the user's "email" column. Is this recommended? I've read to store the ID only, then on ...
1vote
1answer
314views
Zend 'Page Tile' view helper
I've created a ZF2 view helper PageTitle (extending Zend\View\Helper\AbstractHelper). As the name of the helper suggests , it is responsible for rendering the page title for each action view script. ...